import React, { useState } from "react";
import Task from "./Task";

const Tasks = ({ tasks, onDelete, onToggle }) => {
  return (
    <div className="tasks">
      {tasks.map((task) => (
        <Task
          task={task}
          key={task.id}
          onDelete={onDelete}
          onToggle={onToggle}
        />
      ))}
      {/* {tasks.map((task) => (
        <div>
          <h3>{task.text}</h3>
          <p>{task.day}</p>
        </div>
      ))} */}
    </div>
  );
};

export default Tasks;
